<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <script src="https://cdn.bootcdn.net/ajax/libs/angular.js/1.6.8/angular.min.js"></script>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
  </head>
  <body ng-app="myApp" ng-controller="myCtrl">
    <div>
      <h1>{{indexName}}</h1>
    </div>

    <script>
      var app = angular.module("myApp", []);
      app.controller("myCtrl", function ($scope,$compile,$rootScope) {
        $scope.indexName = "主页";
        _scope = $rootScope.$new();
        console.log(_scope);
        scope = $scope.$new()
        console.log(scope);
      });
    </script>
  </body>
</html>
